Removes the element with the specified key from the 
IDictionary.
            
            
            
Syntax
            Parameters
- key
 
- The key of the element to remove.
 - value
 
- The value that was removed.
 
            
            Return Value
true if the element is successfully removed; otherwise, false. This method also returns false if 
key was not found in the original 
IDictionary.
 
            
						
            
            
            
            
Example
BPlusTree/BPlusTree.Test/BasicTests.cs
             | C# |  Copy Code | 
|---|
using (BPlusTree<int, string> data = Create(Options))
{
    Assert.IsTrue(data.TryAdd(1, "a"));
    Assert.IsFalse(data.TryAdd(1, "a"));
    Assert.IsTrue(data.TryUpdate(1, "a"));
    Assert.IsTrue(data.TryUpdate(1, "c"));
    Assert.IsTrue(data.TryUpdate(1, "d", "c"));
    Assert.IsFalse(data.TryUpdate(1, "f", "c"));
    Assert.AreEqual("d", data[1]);
    Assert.IsTrue(data.TryUpdate(1, "a", data[1]));
    Assert.AreEqual("a", data[1]);
    Assert.IsFalse(data.TryUpdate(2, "b"));
    string val;
    Assert.IsTrue(data.TryRemove(1, out val) && val == "a");
    Assert.IsFalse(data.TryRemove(2, out val));
    Assert.AreNotEqual(val, "a");
} | 
 
| VB.NET |  Copy Code | 
|---|
Using data As BPlusTree(Of Integer, String) = Create(Options)
    Assert.IsTrue(data.TryAdd(1, "a"))
    Assert.IsFalse(data.TryAdd(1, "a"))
    Assert.IsTrue(data.TryUpdate(1, "a"))
    Assert.IsTrue(data.TryUpdate(1, "c"))
    Assert.IsTrue(data.TryUpdate(1, "d", "c"))
    Assert.IsFalse(data.TryUpdate(1, "f", "c"))
    Assert.AreEqual("d", data(1))
    Assert.IsTrue(data.TryUpdate(1, "a", data(1)))
    Assert.AreEqual("a", data(1))
    Assert.IsFalse(data.TryUpdate(2, "b"))
    Dim val As String
    Assert.IsTrue(data.TryRemove(1, val) AndAlso val = "a")
    Assert.IsFalse(data.TryRemove(2, val))
    Assert.AreNotEqual(val, "a")
End Using | 
 
 
            
            
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
 
            
            
See Also